package com.jinghao.tws.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.core.common.controller.JingHaoBaseController;
import com.jinghao.core.common.entity.JingHaoBaseEntity;
import com.jinghao.tws.service.IWvPublicSynchronousService;

@Controller
@Scope("prototype")
@RequestMapping(value = "/app/tws/public/syn")
public class WvPublicSynchronousController extends JingHaoBaseController {
	//==================定制内容开始======================
//在这里修改代码
	
	/**
	 * 同步摄像头信息（云平台）
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/updateSynchronousCamera",method = RequestMethod.GET) 
	public Map<String, Object> updateSynchronousCamera(@ModelAttribute("model") JingHaoBaseEntity model){ 
		this.getWvPublicSynchronousService().updateSynchronousCamera();
        return model.getJson();   
	}
	
	/**
	 * 同步流程配置信息（云平台）
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/updateSynchronousFlow",method = RequestMethod.GET) 
	public Map<String, Object> updateSynchronousFlow(@ModelAttribute("model") JingHaoBaseEntity model){ 
		this.getWvPublicSynchronousService().updateSynchronousFlow();
        return model.getJson();   
	}
	
	/**
	 * 同步托盘数据信息（云平台）
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/updateSynchronousAllPalletData",method = RequestMethod.GET) 
	public Map<String, Object> updateAllPalletData(@ModelAttribute("model") JingHaoBaseEntity model){ 
		this.getWvPublicSynchronousService().updateSynchronousAllPalletData();
        return model.getJson();   
	}
	
	/**
	 * 同步托盘视频信息信息（云平台）
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/synchronousAllPalletFileData",method = RequestMethod.GET) 
	public Map<String, Object> synchronousAllPalletFileData(@ModelAttribute("model") JingHaoBaseEntity model){ 
		this.getWvPublicSynchronousService().synchronousAllPalletFileData();
        return model.getJson();   
	}
	
	/**
	 * 同步托盘汇总信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/synchronousAllPalletTjData",method = RequestMethod.GET) 
	public Map<String, Object> synchronousAllPalletTjData(@ModelAttribute("model") JingHaoBaseEntity model){ 
		this.getWvPublicSynchronousService().synchronousAllPalletTjData();
        return model.getJson();   
	}
	//==================定制内容结束======================

	@Autowired
	public void setWvPublicSynchronousService(IWvPublicSynchronousService wvPublicSynchronousService) {
		super.setIJingHaoBaseService(wvPublicSynchronousService);
	}

	public IWvPublicSynchronousService getWvPublicSynchronousService() {
		return (IWvPublicSynchronousService) super.getIJingHaoBaseService();
	}
}
